<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <button id="btn">按钮</button>
  <script>
    class Person {
  constructor(name,age){
    this.name = name
    this.age = age
  }
  job={a:222}
  sayName(){
    console.log(this.job)
  }
}
let a = new Person('tom',22)
// let b = new Person('tom2',33)

// function Person (name,age){
//   this.name=name
//   this.age=age
// }
// Person.prototype.job='程序员'
// Person.prototype.sayName=function(){
//   console.log(this.job)
// }
// let a = new Person('tom',22)


  </script>
</body>
</html>